chore: bump vcpkg and fix win32 CI build#3
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR bumps the vcpkg dependency manager and the wasm-micro-runtime package from version 2.2.0 to 2.4.1, and includes fixes to resolve Windows CI build issues.
- Updates vcpkg baseline and wasm-micro-runtime version with corresponding SHA512 hash
- Adds header guards and inline specifiers to prevent multiple definition errors
- Fixes array declaration and type consistency issues for cross-platform compatibility
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vcpkg_overlays/wasm-micro-runtime/vcpkg.json | Updates package version from 2.2.0 to 2.4.1 |
| vcpkg_overlays/wasm-micro-runtime/portfile.cmake | Updates SHA512 hash for new version |
| vcpkg-configuration.json | Updates vcpkg baseline commit |
| vcpkg | Updates vcpkg submodule commit |
| include/wamr.hpp | Adds header guards, inline specifiers, and fixes array size issue |
| include/cmcpp/traits.hpp | Replaces std math functions with constexpr alternatives and fixes template recursion |
| include/cmcpp/lower.hpp | Changes uint to uint32_t for type consistency |
| include/cmcpp/lift.hpp | Changes uint to uint32_t for type consistency |
| include/cmcpp/context.hpp | Updates function type template syntax |
| CMakeLists.txt | Disables samples by default on Windows |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| constexpr size_t output_size = std::is_same<result_t, void>::value ? 0 : 1; | ||
| wasm_val_t outputs[output_size]; | ||
| wasm_val_t outputs[output_size == 0 ? 1 : output_size]; |
There was a problem hiding this comment.
Zero-length arrays are not standard C++. However, the ternary operator fix output_size == 0 ? 1 : output_size ensures the array always has at least one element, which resolves the compilation issue but may waste memory when no outputs are expected. Consider using a conditional compilation approach or std::array with template specialization for better type safety.
273014d to
56ca932
Compare
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
56ca932 to
84c2554
Compare
No description provided.